<template>
  <Person v-if="isShow"/>
</template>

<script lang="ts" setup name="App">
  import Person from '@/components/Person.vue'
  import { ref, onBeforeMount, onMounted, onBeforeUpdate, onUpdated } from 'vue';

  let isShow = ref(true)
  console.log("父 -----创建")
  onBeforeMount(() => console.log("父 ----- 挂载前")) 
  onMounted(() => console.log("父 ----- 挂载完毕"))

  onBeforeUpdate(() => console.log("父 ----- 更新前"))
  onUpdated(() => console.log("父 ----- 更新完毕"))
</script>
